package com.alinesno.cloud.busines.demo.gateway.dto;


import com.alinesno.cloud.common.facade.dto.BaseDto;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * 功能名： 教师
 * 数据表：  learn_teacher
 * @author wh ${authorEmail}
 * @date 2021-09-06 22:52:32
 */
public class LearnTeacherDto extends BaseDto {
    private static final long serialVersionUID = 1L;
    // fields
        /**
         *  "teacherNumber"
         */
        private String teacherNumber;
        /**
         *  "teacherName"
         */
        private String teacherName;
        /**
         *  "collegeId"
         */
        private String collegeId;
        /**
         *  "classId"
         */
        private String classId;
    //getter and setter
        public String getTeacherNumber()

        {
            return this.teacherNumber;
        }

        public LearnTeacherDto setTeacherNumber(String arg) {
            this.teacherNumber = arg;
            return this;
        }
        public String getTeacherName()

        {
            return this.teacherName;
        }

        public LearnTeacherDto setTeacherName(String arg) {
            this.teacherName = arg;
            return this;
        }
        public String getCollegeId()

        {
            return this.collegeId;
        }

        public LearnTeacherDto setCollegeId(String arg) {
            this.collegeId = arg;
            return this;
        }
        public String getClassId()

        {
            return this.classId;
        }

        public LearnTeacherDto setClassId(String arg) {
            this.classId = arg;
            return this;
        }

    /**
    * 快速从 dto 转换成 entity
    * @return  dto 对应的 entity
    */
    public LearnTeacherDto mapToDto() {
        ObjectMapper toDtoMapper = new ObjectMapper();
        toDtoMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        return toDtoMapper.convertValue(this,LearnTeacherDto.class);
    }

    /**
    * 快速从 entity 转换成 dto
    * @return  dto 对应的 entity
    */
    public LearnTeacherDto fromDto(LearnTeacherDto entity) {
        ObjectMapper fromDtoMapper = new ObjectMapper();
        fromDtoMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        return fromDtoMapper.convertValue(entity,LearnTeacherDto.class);
    }

}
